const express = require('express')
const router = express.Router()
//express.Router()

router.get('/', (req, res) => {
    res.send({
        name: '/',
        type: 'get',
        msg: 'get / 路由'
    })
})

router.get('/home', (req, res) => {
    res.send({
        name: '/home',
        type: 'get',
        msg: 'get /home 路由'
    })
})

router.post('/', (req, res) => {
    res.send({
        name: '/',
        type: 'post',
        msg: 'post / 路由'
    })
})

router.post('/home', (req, res) => {
    res.send({
        name: '/home',
        type: 'post',
        msg: 'post /home 路由'
    })
})

module.exports = router